package com.jctrip.hotel.source.util;

import org.apache.commons.codec.digest.DigestUtils;

import java.nio.charset.StandardCharsets;

/**
 * @Author henry
 * @Date 2023/6/6 22:41
 * @Description
 */
public class WeHotelUtil {

    /**
     * 生成锦江接口签名
     */
    public static String getSign(String appId, String key, Long timestamp) {
        return DigestUtils.sha256Hex((appId + "-" + timestamp + '-' + key).getBytes(StandardCharsets.UTF_8));
    }
}
